import { ParamsPage, ResponsePage } from '@/api/common/type';

// 请求订单表格相关 S
export type OrderListParams = ParamsPage & SearchParams;
// 搜索参数
export interface SearchParams {
    orderNumber: string;
    itemCode: string;
    itemName: string;
    customerName: string;
    orderDateStart: string;
    orderDateEnd: string;
    orderStatus: string;
    creator: string;
    orderDeliveryDateStart: string;
    orderDeliveryDateEnd: string;
    createTimeStart: string;
    createTimeEnd: string;
}

export interface OrderListResponse extends ResponsePage {
    records: OrderListRecord[];
}

export interface OrderListRecord {
    id: number;
    orderNumber: string;
    itemCode: string;
    itemName: string;
    materialName: string;
    customerCode: string;
    customerCompanyName: string;
    orderDate: string;
    orderDeliveryDate: string;
    orderQuantity: number;
    actualInventory: number;
    plannedQuantity: number;
    occupiedStock: number;
    schedulingStatus: string;
    plannedEndTime: string;
    deviationDays: number;
    orderProgress: number;
    orderStatus: string;
    orderPriority: number;
    creator: string;
    dataSource: 'EXCEL' | 'ARTIFICIAL';
    createTime: string;
    hasProcess: boolean;
    hasBom: boolean;
}
//  请求表格相关 E

// 下拉框 物料编码+名称返回参数
export interface MaterialsResponse {
    materialCode: string;
    materialName: string;
}

// 下拉框 客户编码+名称返回参数
export interface InformationResponse {
    customerCompanyName: string;
    customerCode: string;
}

// 添加订单需求参数
export interface AddParams {
    orderNumber: string;
    itemCode: string;
    customerCode: string;
    customerCompanyName: string;
    orderDate: string;
    orderDeliveryDate: string;
    orderQuantity: number;
    orderStatus: string;
    orderPriority: number;
}

// 工艺路线
export interface ProcessResponse extends ResponsePage {
    records: ProcessRecord[];
}

// 工艺路线表格
export interface ProcessRecord {
    [key: string]: any;
    id: number;
    processNumber: number;
    processCode: string;
    processName: string;
    replacementTime: number;
    transshipmentBatch: number;
    transshipmentTime: number;
    processingContent: string;
    equipmentCode: string;
    productionBeat: number;
    auxiliaryDataCoding: string;
    processingBatch: number;
}
